package kr.saeildamil.androidstudy.ch17;

import android.app.TabActivity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

@SuppressWarnings("deprecation")
public class TabTest extends TabActivity {
	TabHost mTab;
	
	@SuppressWarnings("deprecation")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		TabHost tabHost = getTabHost();
		
		Intent int01 = new Intent("kr.saeildamil.androidstudy.LIFE");
		int01.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("LIFECYCLE")
				.setIndicator("LifeCycle")
				.setContent(int01));
		
		Intent int02 = new Intent(this, SaveState.class);
		// ComponentName componentname = new ComponentName("kr.saeildamil.androidstudy.ch17","kr.saeildamil.androidstudy.ch17.SaveState");
		// int02.setComponent(new ComponentName("kr.saeildamil.androidstudy.ch17","kr.saeildamil.androidstudy.ch17.SaveState"));
		int02.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("SAVESTATE")
				.setIndicator("SaveState")
				.setContent(int02));
		
		Intent int03 = new Intent(this, SaveCurve.class);
		int03.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("SAVECURVE")
				.setIndicator("SaveCurve")
				.setContent(int03));
	}
}
